
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Foxdriver is a Node library which provides a high-level API to control Firefox over the Remote Debugging Protocol
Foxdriver is a Node library which provides a high-level API to control Firefox over the Remote Debugging Protocol.
To use Foxdriver in your project, run:
$ yarn add foxdriver
# or
$ npm i foxdriver
The Firefox Remote Debugging Protocol consists of multiple actors that provide different methods. The Foxdriver API allows you to launch a Firefox instance and connects to the protocol interface automatically. From there you can access the methods of all actors.
Example - opening page and get console.logs
import Foxdriver from 'foxdriver'
(async () => {
const { browser, tab } = await Foxdriver.launch({
url: 'https://www.mozilla.org/en-US'
})
// enable actor
await tab.console.startListeners()
// wait until page is loaded
await new Promise((resolve) => setTimeout(resolve, 3000))
// receive logs and page errors
const logs = await tab.console.getCachedMessages()
console.log(logs)
// close browser
browser.close()
})()
You can also attach yourself to an already running Firefox browser. This requires to start the browser with the -start-debugger-server=<port>
cli argument and have the following settings set:
devtools.chrome.enabled: true
devtools.debugger.prompt-connection: false
devtools.debugger.remote-enabled: true
To attach yourself to the browser you then need to create a Foxdriver instance with the correct port and host and call the connect()
method:
import Foxdriver from 'foxdriver'
(async () => {
const { browser, tab } = await Foxdriver.attach('localhost', 9222)
const preferences = await browser.preference.getAllPrefs()
// ...
})()
Attaches client to an already running instance.
host
<String>
host where Firefox instance was launchedport
<Number>
port on which the Firefox instance was launched<Promise<Object>>
tab
<[Tab]>
list of opened tabsbrowser
<Browser>
browser instanceAttaches client to an already running instance.
options
<Object>
port
<Number>
port on which the Firefox instance should get launchedbin
<String>
path to Firefox binary (default: OS default path)args
<[String]>
list of arguments pass to fs.spawn
(default: []
)<Promise<Object>>
tab
<Tab>
opened tabbrowser
<Browser>
browser instanceDisconnects from the browser instance and closes browser if launched via launch()
method
Attaches to this tab
<Promise>
fulfills once request was sentDetaches from this tab
<Promise>
fulfills once request was sentReloads current page url.
<Promise>
fulfills once request was sentNavigates to a certain url
url
<String>
url to navigate to<Promise>
fulfills once request was sentFor more information please see API docs.
FAQs
Foxdriver is a Node library which provides a high-level API to control Firefox over the Remote Debugging Protocol
The npm package foxdriver receives a total of 43 weekly downloads. As such, foxdriver popularity was classified as not popular.
We found that foxdriver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.